package com.xopencode.spring.引入外部文件;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * @Auther: Mcb
 * @Date: 2022/3/12 18:30
 * @Description:
 */
@Component
@PropertySource(value = "classpath:spring.properties")
public class UserInfo {

    //用户ID
    @Value("${xopencode}")
    private String userId;

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }
}
